After completing this lesson, you’ll be able to:
Videos are provided in this course if you prefer to watch instead of reading the text below. Note that some Quiz answers might require you to read the text.
Parameters control how FME operates: how data is read in, transformed and written out using various FME components. This lesson will explain the different types of published parameters available within FME as well as go through an example on how to create a published parameter. Workspace parameters are the key to giving the end-user control over self-serve workspaces.
Parameters are what control FME translations and transformations. Remember that a translation has a hierarchy of different translation components:
Each different level of the hierarchy has a set of parameters that belong to it. That means there are:
Most of the available parameters are determined by the author of the workspace.
Although workspace authors set most of the parameters, in some cases, the end-user needs to be able to set some of them.
To enable users to select the requirements for their translation, FME includes functionality called user parameters. User parameters are methods for getting input into a workspace.
When a user parameter is made available to the end-user, it is called a published parameter. In a self-serve application, published parameters are important for letting the end-user control how the data is served.
For self-serve systems, published parameters are most commonly used to set:
With FME Flow, the key to successful workspace authoring is flexibility. Workspaces need to be flexible to allow end-users to make choices without seeing all of the complexity of the workspace or the data behind it. Parameters are one way to accomplish this.
There are two types of parameters in FME: FME parameters and user parameters.
FME Parameters are built into the FME Workbench interface and directly control the translation. Examples of FME Parameters include the WHERE clause, Search Envelope coordinates, and Character Encoding.
There are two types of User Parameters, published and private. A published parameter is visible by the end-user, while a private parameter is visible by the author creating the workspace. User Parameters are required by default. Setting a parameter to be not required means a user must enter a value otherwise FME will not run the translation.
A published and private user parameter. Note the lock icon on the private parameter.
Any parameter in FME can be published and presented to the user as a choice to be made when running a workspace.
In FME Workbench, parameters are located in several places, but the FME Workbench Navigator window is the one place where you will find them gathered in a single location:
As you can see, there are parameters for the source data location (1) and the destination dataset (2), which is the one that the Data Download service overrides. There are also parameters for controlling the coordinate system (3), general Reader and Writer parameters (4), parameters for each feature type (5), and parameters for transformers (6).
Parameters are published by right-clicking on them and choosing “Create User Parameter.” For example, here a workspace author is publishing a parameter on the AreaCalculator transformer:
The author gets to choose if the parameter will be published or private, if it will be required to run the workspace, the user prompt, and the default value.
When the workspace is run on FME Flow the end-user will now be able to decide what value to use:
Transformer parameters can also be published directly in transformer dialogs:
When you create a user parameter this way, FME will automatically choose the options available to the user. You can see that the options for the AreaCalculator's Type parameter, Plane Area or Sloped Area, are automatically created. Creating user parameters this way is fast and you are guaranteed that whatever input the user chooses will be valid.
However, it can also create problems. For example, if you wanted to create a user parameter for a numerical value (e.g., the Bufferer's Buffer Distance), by default the user could enter any numerical value. You might prefer to do some validation by restricting the options. In order to accomplish this, you can create your own user parameter using the Parameter Manager, explained below.
You can add, configure, reorder, and group parameters in the Parameter Manager dialog. You can access the Parameter Manager by right-clicking User Parameters in the Navigator and choosing Manage User Parameters...
The left-hand side of the Parameter Manager is where all of your created parameters are shown, as well as options to add new ones, group, copy and paste, reorder and delete.
The right-hand side is the properties for the newly created or selected parameter.
To create a new user parameter in the Parameter Manager you first click the Plus icon in the top-left of the dialog. Then, choose a parameter type:
After choosing your parameter type, you can configure the new parameter on the right side of the dialog.
While the exact configuration varies by parameter type, the shared options include:
$(myIdentifier)
) and menus.
In FME 2023.0 and newer, we can now create conditional visibility published user parameters.This is where you can create new user parameters and set conditions on when they should be shown to the end-user.
After configuring your user parameter you can click OK to close the dialog or the plus to add another. You can use the other buttons to move and remove parameters.
After creating user parameters using the Parameter Manager, they will appear in the Navigator under User Parameters. At this point, the user parameter exists, but it does not actually control anything. To use it to control your workspace, you need to link it to a parameter elsewhere in the workspace. Find the parameter, right-click it, and choose User Parameter > Link to User Parameter. Here we are linking a Text user parameter named Delimiter to the Delimiter Character parameter of a CSV reader:
You can also link user parameters directly in transformer dialogs using the drop-down arrow and choosing User Parameter:
Overall, user parameters still function the same, and the end-user will have the same experience, but now as a user parameter author, you will have a few more options to fine-tune your parameters.